package com.my.createtype.singletion;




public class Test implements Runnable {

	public static void main(String[] args) {
		/*Singleton s = Singleton.getInstance();
		com.my.createtype.singletion.Singleton.Holder h = new Singleton.Holder();
		System.out.println(s == com.my.createtype.singletion.Singleton.Holder.s);*/
		
		/*SafeSingletion.getInstance();
		SafeSingletion.getInstance();
		SafeSingletion.getInstance();*/
		
		new Thread(new Test()).start();
		new Thread(new Test()).start(); // 多线程果然会多次初始化
		new Thread(new Test()).start();
		
	}

	@Override
	public void run() {
		SafeSingletion.getInstance();
	}

}
